<!--
 * @FileDescription 扩展信息
 * @Author 杨宇翔
 * @Date 20220706 10:27:28
 * @LastEditors 杨宇翔
 * @LastEditTime 20220706 10:27:28
-->
<template>
    <div class="extension-information">
        <table>
            <tbody>
                <template v-for="data of datas" :key="data.Id">
                    <tr>
                        <td>
                            <span>{{ data.Name }}</span>
                        </td>
                        <td>
                            <span>{{ data.Value }}{{ data.Unit }}</span>
                        </td>
                    </tr>
                </template>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ProtocolComponent } from './InertialNavigationComponent';
import { computed } from 'vue';


const datas = computed(() => ProtocolComponent.Default.UseConfigs.filter(config => config.Id > 100));
</script>

<style scoped>
.extension-information {
    grid-area: extension;

    padding-top: 6.2rem;

    background-color: #0d0d14;

    display: flex;
    justify-content: center;
    align-items: center;
}

table {
    height: 100%;
}

td:first-of-type>span {
    padding-right: 1rem;

    color: #81859C;
    font-size: 1.8rem;

    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

td:last-of-type>span {
    display: inline-block;

    width: 15rem;
    height: 3.6rem;
    color: #B1B1D4;
    font-size: 1.8rem;
    line-height: 3.6rem;
    text-align: center;

    border: solid 0.1rem #36384B;

    opacity: 0.5;
}

td:last-of-type>span:hover {
    border: solid 0.1rem;
    border-image: linear-gradient(90deg, rgba(128, 125, 225, 1), rgba(33, 140, 222, 1)) 1 1;
    opacity: 1;
}
</style>